#pragma once
#ifndef __FORWARD_H__
#define __FORWARD_H__

#include <msg/message.h>
#include <span>

class forward : public message{
public:
    forward(void* ptr, uint32_t size){
        set_message_type(MessageType::FORWARD);
        set_content(0, ptr, size);
    }
    
    forward(message msg){
        *static_cast<message*>(this) = msg;
    }

    std::span<char> get_forward_data(){
        return {reinterpret_cast<char*>(get_content_ptr(0)), get_router_info().data_size};
    }
};

#endif // __FORWARD_H__